<template>
	<view class="empty_data centerV" :style="{backgroundColor:bgColor}">
		<slot>
			<slot name="image">
				<image lazy-load v-if="imageSrc" :src="imageSrc" style="width: 480rpx;height: 317rpx;" mode="aspectFill" />
			</slot>
			<slot name="desc">
				<text class="mt35 color9 fs30" v-if="desc">{{desc}}</text>
			</slot>
		</slot>
	</view>
</template>

<script setup>
	const props = defineProps({
		imageSrc: {
			type: String,
			default: 'https://monvkeji.oss-cn-chengdu.aliyuncs.com/yinfa/images/empty/data.png'
		},
		desc: {
			type: String,
			default: '暂无数据'
		},
		bgColor: {
			type: String,
			default: '#fff'
		}
	})
	defineExpose({
		name: 'emptyData'
	})
</script>

<style lang="scss">
	.empty_data {
		width: 100%;
		height: 100%;
		animation: lazyin .5s;
	}

	@keyframes lazyin {
		from {
			opacity: 0;
		}

		to {
			opacity: 1;
		}
	}
</style>